﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Orid.Management.Statistics.Tools.Decomposition.Model
{
    class ModelJudgeObject:ModelBase
    {
        Guid judgeID;

        public Guid JudgeID
        {
            get { return judgeID; }
            set { judgeID = value; }
        }
        Guid inputobjectID;

        public Guid InputobjectID
        {
            get { return inputobjectID; }
            set { inputobjectID = value; }
        }
        int categoryID;

        public int CategoryID
        {
            get { return categoryID; }
            set { categoryID = value; }
        }

        string transverse;
        /// <summary>
        /// 图片方向
        /// </summary>
        public string Transverse
        {
            get { return transverse; }
            set { transverse = value; }
        }

       

        double duration;

        public double Duration
        {
            get { return duration; }
            set { duration = value; }
        }

        //2010-09-18
        //lidawei
        //ma release 25 drop
        //double propagationTime;

        //public double PropagationTime
        //{
        //    get { return propagationTime; }
        //    set { propagationTime = value; }
        //}

       

    

            //public string  照和标志;

            int x, y, width, height, index;

            /// <summary>
            /// JudgeObject在inputobject中的index
            /// </summary>
            public int Index
            {
                get { return index; }
                set { index = value; }
            }

            public int Height
            {
                get { return height; }
                set { height = value; }
            }

            public int Width
            {
                get { return width; }
                set { width = value; }
            }

            public int Y
            {
                get { return y; }
                set { y = value; }
            }

            public int X
            {
                get { return x; }
                set { x = value; }
            }



            Guid jobid, orderID;

            public Guid OrderID
            {
                get { return orderID; }
                set { orderID = value; }
            }

            public Guid JobID
            {
                get { return jobid; }
                set { jobid = value; }
            }

            List<ModelJudgeResult> listJudgeResult = new List<ModelJudgeResult>();

            internal List<ModelJudgeResult> ListJudgeResult
            {
                get { return listJudgeResult; }
                set {
                    listJudgeResult = value;
 
                }
            }

            //job类型
            Logic.JobClass jobClass;

            public Logic.JobClass JobClass
            {
                get { return jobClass; }
                set { jobClass = value; }
            }

            List<ModelProgress> listModelProgress = new List<ModelProgress>();

            public List<ModelProgress> ListModelProgress
            {
                get { return listModelProgress; }
                set { listModelProgress = value; }
            }

            
           protected override void GetException( )
            { 
                listJudgeResult.Clear();
                if (listJudgeResult.Count > 1)
                {
                      AddException("JudgeResultCoutException",
                           "判定结果数量异常。" + "结果数量:" + listJudgeResult.Count.ToString() + ";jobID=" +  this.JobID.ToString());
                }

                if (duration > _durationMax)
                {
                  AddException("JudgeResultDurationException",
                                           "判定结果录入时间异常。" + "结果录入时间(S):" + duration.ToString() +";jobID=" +  this.JobID.ToString());
                }

             
            }

             private List<ModelCandidacyJudgeResult> finalResult = new List<ModelCandidacyJudgeResult> ();

            public   List<ModelCandidacyJudgeResult> FinalResult
            {
              get { return finalResult; }
              set { finalResult = value; }
            }

            Guid? dataStoreID;

            public Guid? DataStoreID
            {
                get { return dataStoreID; }
                set { dataStoreID = value; }
            }

            int fileSize;

            public int FileSize
            {
                get { return fileSize; }
                set { fileSize = value; }
            }        

    }
}
